package appli;

import neurons.MyNeuronTypes;
import neurons.NeuronInterface;

public class Appli {

	public void testORStart() {

		NeuronFactory neuronFactory = new NeuronFactory();

		NeuronInterface in = neuronFactory.create(MyNeuronTypes.IN);
		NeuronInterface in2 = neuronFactory.create(MyNeuronTypes.IN);
		NeuronInterface neuron = neuronFactory.create(MyNeuronTypes.MIDDLE);
		NeuronInterface out = neuronFactory.create(MyNeuronTypes.OUT);

		in.sendConnectionTo(neuron);
		in2.sendConnectionTo(neuron);
		neuron.sendConnectionTo(out);

		TrainerInterface trainer = new TrainerOr(in, out);
		try {
			trainer.train();
		} catch (BadOutNeuronPassed e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

	public void start() {
	}

}
